# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org>
pkgname=putty
pkgver=0.80
pkgrel=0
pkgdesc="SSH and telnet client"
url="https://www.chiark.greenend.org.uk/~sgtatham/putty/"
arch="all"
license="MIT"
depends="ncurses-terminfo-base"
makedepends="cmake gtk+3.0-dev linux-headers perl samurai"
subpackages="$pkgname-doc"
source="https://the.earth.li/~sgtatham/putty/$pkgver/putty-$pkgver.tar.gz"
options="!check" # no test suite

# secfixes:
#   0.80-r0:
#     - CVE-2023-48795
#   0.76-r0:
#     - CVE-2021-36367
#   0.74-r0:
#     - CVE-2020-14002
#   0.73-r0:
#     - CVE-2019-17068
#     - CVE-2019-17069
#   0.71-r0:
#     - CVE-2019-9894
#     - CVE-2019-9895
#     - CVE-2019-9897
#     - CVE-2019-9898

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
c8a6b6fa54ecd8bcf4ec274fef51343dd9996e6458b250b5555c4dc88ded25e87f97277da482c29858510e65635112d541f559ab683635bd950572d850129f90  putty-0.80.tar.gz
"
